import {post} from "./common/js/http";
import {getLocalStorage, removeLocalStorage} from "./common/js/cache";
if(writeLogsStatus===1){
    setInterval(()=>{
        if (getLocalStorage('myLogs')!=undefined&& getLocalStorage('myLogs')!=''&&getLocalStorage('myLogs')!=null&&getLocalStorage('myLogs')!=[]){
            post('logs/write',{myLogs:getLocalStorage('myLogs')})
                .then((res)=>{
                    if (res.data.res==1){
                        removeLocalStorage('myLogs')
                    }
                }).catch((res)=>{
                    consoleLog(res)
            })
        }
    },1000*60*60)//一个小时发送一次日志数据到后台，监控用户操作
}
